# Maintainer: Antoni Aloy <aaloytorrens@gmail.com>
pkgname=py3-imageio
pkgver=2.10.3
pkgrel=1
pkgdesc="Python library that provides an easy interface to read and write a wide range of image data"
url="https://github.com/imageio/imageio"
license="BSD-2-Clause"
# ppc64le: test failures
arch="noarch !ppc64le"
depends="python3 py3-numpy py3-pillow freeimage"
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-psutil py3-imageio-ffmpeg"
source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/i/imageio/imageio-$pkgver.tar.gz"
builddir="$srcdir/imageio-$pkgver"

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$PWD"/build/lib IMAGEIO_NO_INTERNET=1 pytest -v
}

package() {
	python3 setup.py install --root="$pkgdir" --optimize=1

	# remove unneeded binaries
	rm -r "$pkgdir"/usr/bin
}

sha512sums="
56bc2cbd0544b4ad6c3d4c85fcc2f6656605d9216dd640c649a977fbe46347b8053aad92ac3168716c461f0ec4647623ab93cc65816c7caccc19282e2fadcec8  py3-imageio-2.10.3.tar.gz
"
